﻿using System;
using System.Collections.Generic;
using System.Text;

using SplitOS.OSAL.INTERNAL;

namespace SplitOS.OSAL
{
    public class Parser
    {
        public void Parse(string snippet)
        {
            // BINARY/META/COMMENT
            if (snippet == "BINARY" || StringTools.StartsWith(snippet, "//") || StringTools.StartsWith(snippet, "META")) { }
            // PRINT Text
            else if (StringTools.StartsWith(snippet, "PRINT ")) Console.Write(snippet.Remove(0, 6));
            // PRINTLN Text
            else if (StringTools.StartsWith(snippet, "PRINTLN ")) Console.Write(snippet.Remove(0, 8));
        }
    }
}
